﻿@model PaginatedList<YAZHXQ.Models.Models.StaffInfo>

@{
    ViewData["Title"] = "Index";
}

<h2>员工列表</h2>

<p>
    <a asp-action="Create">Create New</a>
</p>
<form asp-action="Index" method="get">
    <div class="form-actions no-color">
        <p>
            Find by name: <input type="text" name="SearchString" value="@ViewData["currentFilter"]" />
            <input type="submit" value="Search" class="btn btn-default" /> |
            <a asp-action="Index">Back to Full List</a>
        </p>
    </div>
</form>
<table class="table">
    <thead>
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.First().AccountNo)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.First().Kqjno)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.First().Name)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.First().IsDel)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.First().Tel)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.First().OrderId)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.First().AreasCode)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.First().AccountPwd)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.First().SexName)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.First().SexCode)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.First().Birthday)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.First().ColledgeName)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.First().ProfessionalName)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.First().StaffImg)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.First().MarriageName)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.First().MarriageCode)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.First().NationalCode)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.First().NationalName)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.First().PoliticalStatusName)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.First().PoliticalStatusCode)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.First().Idnumber)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.First().Address)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.First().Email)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.First().OtherInfo)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.First().PostId)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.First().DeptId)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.First().StaffIp)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.First().Grade)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.First().CreateStaffId)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.First().CreateTime)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.First().UpdateStaffId)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.First().UpdateTime)
            </th>
            <th></th>
        </tr>
    </thead>
    <tbody>
        @foreach (var item in Model)
        {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.AccountNo)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Kqjno)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Name)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.IsDel)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Tel)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.OrderId)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.AreasCode)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.AccountPwd)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.SexName)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.SexCode)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Birthday)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.ColledgeName)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.ProfessionalName)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.StaffImg)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.MarriageName)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.MarriageCode)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.NationalCode)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.NationalName)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.PoliticalStatusName)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.PoliticalStatusCode)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Idnumber)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Address)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Email)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.OtherInfo)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.PostId)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.DeptId)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.StaffIp)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Grade)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.CreateStaffId)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.CreateTime)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.UpdateStaffId)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.UpdateTime)
                </td>
                <td>
                    <a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
                    <a asp-action="Details" asp-route-staffId="@item.Id">Details</a> |
                    <a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
                </td>
            </tr>
        }
    </tbody>
</table>
@{
    var prevDisabled = !Model.HasPreviousPage ? "disabled" : "";
    var nextDisabled = !Model.HasNextPage ? "disabled" : "";
}

<a asp-action="Index"
   asp-route-sortOrder="@ViewData["CurrentSort"]"
   asp-route-pageNumber="@(Model.PageIndex - 1)"
   asp-route-currentFilter="@ViewData["CurrentFilter"]"
   class="btn btn-default @prevDisabled">
    Previous
</a>
<a asp-action="Index"
   asp-route-sortOrder="@ViewData["CurrentSort"]"
   asp-route-pageNumber="@(Model.PageIndex + 1)"
   asp-route-currentFilter="@ViewData["CurrentFilter"]"
   class="btn btn-default @nextDisabled">
    Next
</a>